INCLUDE("${CMAKE_CURRENT_LIST_DIR}/NxcommonTargets.cmake")

SET(NXCOMMON_EXCEPTION_POSITION_INFO "@NXCOMMON_EXCEPTION_POSITION_INFO@")
SET(NXCOMMON_SQLITE_ENABLED "@NXCOMMON_SQLITE_ENABLED@")
SET(NXCOMMON_MYSQL_ENABLED "@NXCOMMON_MYSQL_ENABLED@")
SET(NXCOMMON_PSQL_ENABLED "@NXCOMMON_PSQL_ENABLED@")
SET(NXCOMMON_LUA_ENABLED "@NXCOMMON_LUA_ENABLED@")
SET(NXCOMMON_QT_SUPPORT "@NXCOMMON_QT_SUPPORT@")
SET(NXCOMMON_BULLET_SUPPORT "@NXCOMMON_BULLET_SUPPORT@")
SET(NXCOMMON_CMAKE_MODULE_PATH "@NXCOMMON_CMAKE_MODULE_PATH@")

GET_PROPERTY(compdefs TARGET nxcommon PROPERTY INTERFACE_COMPILE_DEFINITIONS)

LIST(FIND compdefs "__CMAKE_DUMMY_EXPORT_IS_INSTALLED" instdefidx1)
LIST(FIND compdefs "-D__CMAKE_DUMMY_EXPORT_IS_INSTALLED" instdefidx2)

IF(NOT instdefidx1 EQUAL -1  OR  NOT instdefidx2 EQUAL -1)
    SET(INSTALLED ON)
ELSE()
    SET(INSTALLED OFF)
ENDIF()


IF(INSTALLED)
    SET(NXCOMMON_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}/${NXCOMMON_CMAKE_MODULE_DIR_INSTALL}")
ELSE()
    SET(NXCOMMON_CMAKE_MODULE_DIR "${NXCOMMON_CMAKE_MODULE_DIR_BUILD}")
ENDIF()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${NXCOMMON_CMAKE_MODULE_DIR}")
